<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'menu-form',
    'enableAjaxValidation' => false,
    'enableClientValidation' => true,
    'htmlOptions' => array(
        'class' => 'form-horizontal',
    ),
        ));
?>
<div class="row-fluid">
    <div class="control-group">
        <label class="control-label">Priority</label>
        <div class="controls">
            <?php
                echo $form->textField($model,'priority', array("placeholder"=>"Display order","maxlength"=>"100", "size"=>"60"))
            ?>
            <span class="help-inline"><?php echo $form->error($model, 'priority'); ?></span>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label">Menu Name</label>
        <div class="controls">
            <?php echo $form->textField($model, 'name', array('placeholder' => 'Menu name', "maxlength"=>"100", "size"=>"60"));?>
            <span class="help-inline"><?php echo $form->error($model, 'name'); ?></span>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label">Parent Menu</label>
        <div class="controls">
            <?php echo $form->dropDownlist($model, 'parent_id', MyFunctionCustom::parent_menu(),array('empty' => '-- Parent Menu --'));?>
            <span class="help-inline"><?php echo $form->error($model, 'name'); ?></span>
        </div>
    </div>

    <div class="controls">
        <label>
            <input name="Menu[static_page]" type="checkbox" <?php if($model['static_page']) echo "checked='checked'";?>>
            <span class="lbl"> Is static page</span>
        </label>
    </div>
    
    <div class="control-group">
        <label class="control-label">Status</label>
        <div class="controls">
            <?php 
            echo $form->dropDownlist($model, 'disabled', MyFunctionCustom::$status);?>
        </div>
    </div>

    <div class="control-group" >
        <label class="control-group">Decription</label>
    </div>       
        <?php
            $this->widget('ext.editMe.ExtEditMe', array(
            //'name' => 'short_description',
            'id' => 'description_',
            'height' => '250px',
            'model' => $model,
            'width' => '100%',
            'attribute' => 'description',
            'toolbar' => Yii::app()->params['ckeditor'],
            'filebrowserBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html',
            'filebrowserImageBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Images',
            'filebrowserFlashBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Flash',
            'filebrowserUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
            'filebrowserImageUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
            'filebrowserFlashUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
        ));
    ?>

    <div class="form-actions">
        <button class="btn btn-info" type="submit">
            <i class="icon-ok bigger-110"></i>Submit
        </button>
    </div>
</div>
<?php $this->endWidget(); ?>